#!/bin/bash
#OLA_CRUISE_ENV=prod go build -o mcp-server-booking cmd/mcp/main.go
#upx --best --lzma --force-macos mcp-server-booking
APP_NAME="booking-mcp"
SOURCE_FILE="cmd/mcp/main.go"


echo "⛏ 编译 macOS 版本..."
GOOS=darwin GOARCH=amd64 go build -o ${APP_NAME}-darwin-amd64 ${SOURCE_FILE}

echo "⛏ 编译 Linux 版本..."
GOOS=linux GOARCH=amd64 go build -o ${APP_NAME}-linux-amd64 ${SOURCE_FILE}

echo "⛏ 编译 Windows 版本..."
GOOS=windows GOARCH=amd64 go build -o ${APP_NAME}-windows-amd64.exe ${SOURCE_FILE}

echo "✅ 所有平台编译完成"